package com.ferry.config.client.enumValue;

/**
 * Created by daiyong
 */
public enum Env {


	DEV("dev", "http://fconfig-dev:8080/fConfigServer/get", "http://fconfig-dev:8080/fConfigServer/longPoll", "localhost:2181"),
	TEST("test", "http://fconfig-test:8080/fConfigServer/get", "http://fconfig-test:8080/fConfigServer/longPoll", "localhost:2181"),
	STAGING("staging", "http://fconfig-staging:8080/fConfigServer/get","http://fconfig-staging:8080/fConfigServer/longPoll", "localhost:2181"),
	PROD("prod", "http://fconfig-prod:8080/fConfigServer/get", "http://fconfig-prod:8080/fConfigServer/longPoll", "localhost:2181");

	private String env;
	private String getUrl;
	private String longPollUrl;
	private String zkUrl;


	Env(String env, String getUrl, String longPollUrl, String zkUrl) {
		this.env = env;
		this.getUrl = getUrl;
		this.longPollUrl = longPollUrl;
		this.zkUrl = zkUrl;
	}

	public String getEnv() {
		return env;
	}

	public static Env lookUp(String env) {
		for (Env value : values()) {
			if (value.getEnv().equals(env)) {
				return value;
			}
		}
		return null;
	}

	public String getGetUrl() {
		return getUrl;
	}

	public String getLongPollUrl() {
		return longPollUrl;
	}

	public String getZkUrl() {
		return zkUrl;
	}
}
